import React, { Component } from 'react';
import { Link } from "react-router-dom";
import RouterView from '../component/router/RouterView'
export default class Index extends Component {
  constructor(props){
    super(props)
    this.state={
      val: ''
    }

  }
  changeInput(e){
    this.setState({
      val:e.target.value
    })
  }
  render() {
    let {routes} = this.props;
    return (
        <div className="content">
          <div className="left">
            <Link to='/index/user'>user</Link>
            <br/>
            <Link to='/index/home'>home</Link>
          </div>
          <input type="text" value={this.state.val} onChange={(e)=>this.changeInput(e)}/>
          <hr/>
          <RouterView routes={routes}/>
        </div>
    );
  }
}
